package io.github.yedaxia.apidocs.parser;

import com.github.javaparser.ast.type.Type;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.File;
import java.util.ArrayList;
import java.util.List;

/**
 * generic node of model class
 *
 * @author yeguozhong yedaxia.github.com
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class GenericNode {

    private Type classType; // for source
    private Class modelClass; //for reflection
    private String placeholder;
    private File fromJavaFile;
    private List<GenericNode> childGenericNode = new ArrayList<>();

    public void addChildGenericNode(GenericNode childNode){
        this.childGenericNode.add(childNode);
    }

}
